package test.read;
import java.io.*;
public class RegisterFile {

	public static void main(String[] args) {
		try {
			FileReader input = new FileReader("f://number.txt");
			BufferedReader br = new BufferedReader(input);
			FileWriter output = new FileWriter("f://guolv.txt");
			BufferedWriter bw = new BufferedWriter(output);
			String s = br.readLine();			
			while ( s!=null) {
			   try{
				bw.write(s.substring(0,s.indexOf(":")));
				bw.newLine();
			   }catch(Exception e){
				  System.out.println("-----"+s);
			   }
			s = br.readLine();
			}		
			br.close();
			bw.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}